<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test07</title>
</head>
<body>
    <script type="text/javascript">
        var a = 1;
        var b = 2;
        var num = a;
        a = b;
        b = num;
        alert("a="+a+"  b="+b);
    </script>
</body>
</html>